package BehaviorModel.iterorModel;

import java.util.Objects;

/**
 * 功能描述: 部门信息
 * 2024/05/07
 * <p>
 * ZhangYi
 */
public class Department {
    // 部门名称
    private String name;
    // 部门描述
    private String desc;

    public Department() {
    }

    public Department(String name,
                      String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Department that = (Department) o;
        return Objects.equals(name,
                              that.name) && Objects.equals(desc,
                                                           that.desc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name,
                            desc);
    }

    @Override
    public String toString() {
        return "Department{" +
                "name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}
